<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>常见网页布局1</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }

        li {
            list-style: none;
        }

        .top {
            width: 100%;
            height: 50px;
            line-height: 50px;
            background-color: gray;
            text-align: center;
        }

        .banner {
            /* width: 980px; */
            width: 80%;
            height: 150px;
            line-height: 150px;
            background-color: gray;
            margin: 10px auto;
            text-align: center;
        }

        .box {
            width: 80%;
            height: 300px;
            margin: 10px auto;
            background-color: pink;
        }

        .box li {
            width: 23.5%;
            height: 300px;
            background-color: gray;
            float: left;
            margin-right: 2%;
        }

        .box .last {
            margin-right: 0;
        }

        .footer {
            height: 200px;
            line-height: 200px;
            background-color: gray;
            margin-top: 10px;
            text-align: center;
        }
    </style>
</head>

<body>
    <div class="top">top</div>
    <div class="banner">banner</div>
    <div class="box">
        <ul>
            <li>1</li>
            <li>2</li>
            <li>3</li>
            <li class="last">4</li>
        </ul>
    </div>
    <div class="footer">footer</div>
</body>

</html>